﻿@model CMS.UI.Models.LoginModel
@{
    ViewBag.Title = "Forgotten Password";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<section class="sectionLogin">
    <form action="@Url.Action("ForgottenPassword", "Admn")" method="POST">
        <fieldset>
            <legend class="sectionHeader">Password reminder</legend>
            @if (!(bool)this.ViewBag.MailSent)
            {
            <div class="formRow">
                Please enter your registered email address below. Click <b>"Send"</b> to reset your password. Your new password will be emailed to you.
            </div>
            <div class="formRow">
                <label for="iEmail">Email Address</label>
                @Html.TextBoxFor(m => m.Email, new { id = "iEmail" })
            </div>
            <div class="formRow">
                <span class="field-validation-error" data-valmsg-for="EmailAddress" data-valmsg-replace="true">
                    <span for="iEmail" class="" style=""></span>
                </span>
                @Html.ValidationSummary(false)
            </div>
            <div class="formRow">
                <div class="btn"><span><input type="submit" value="Send" /></span></div>
            </div>
            }
            else
            {
            <div class="formRow">
                Your password has been sent to your registered Email address. Please allow up to an hour for the email to arrive.
            </div>
            }
        </fieldset>
    </form>
    <div>
        <a class="btnGrey" href="@Url.Action("Login", "Admn")">Go to Login »</a>
    </div>
</section>
